import React, { Component } from 'react'
import axios from 'axios'
import { fn } from '../../high'

//  高阶组件 
// /api/getMyList
class My extends Component {
    render() {
        const { list } = this.props
        return (
            <div>
                <h3>高阶组件</h3>
                <ul>
                    {
                        list.map((item, index) => {
                            return <li key = { index }>
                                { item.title }
                            </li>
                        })
                    }
                </ul>
            </div>
        )
    }
}


export default fn(My, '/api/getMyList')